<!DOCTYPE html>
<html lang="en" xmlns:th="https://www.thymeleaf.org/">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <h1>hello.html</h1>

        ${message}
        <br/>

        [[${message}]]
        <br/>
        [(${message})]
        <br/>
        <div>[[${message}]]</div>
        <div th:text="${message}"></div>

        <!--[[${emps}]]-->

        <table border="1" width="70%">
            <tr>
                <th>序号</th>
                <th>id</th>
                <th>name</th>
                <th>salary</th>
            </tr>

            <tr th:each="emp,i:${emps}">
                <td>[[${i.count}]]</td>
                <td>[[${emp.id}]]</td>
                <td>[[${emp.name}]]</td>
                <td th:if="${emp.salary<10000}" style="color: red;">[[${emp.salary}]]</td>
                <td th:if="${emp.salary>=10000}" style="color: green;">[[${emp.salary}]]</td>
            </tr>

        </table>


        <form action="#">
            <input type="hidden" name="id" th:value="${user.id}"/><br/>
            username:<input type="text" name="username" th:value="${user.username}"/><br/>
            password:<input type="password" name="password" th:value="${user.password}"/><br/>
            sex:<input type="radio" name="sex" value="1" th:checked="${'1' eq user.sex?'checked':'false'}"/>m
                <input type="radio" name="sex" value="0" th:checked="${'0' eq user.sex?'checked':'false'}"/>w<br/>
            edu:<select name="edu">
                    <option>---select---</option>
                    <option value="1" th:selected="${'1' eq user.edu?'selected':'false'}">aaa</option>
                    <option value="2" th:selected="${'2' eq user.edu?'selected':'false'}">bbb</option>
                    <option value="3" th:selected="${'3' eq user.edu?'selected':'false'}">ccc</option>
                </select><br/>
            hobbies:<input type="checkbox" name="hobbies" value="1" th:checked="${#arrays.contains(user.hobbies,'1')?'checked':'false'}"/>eat
                    <input type="checkbox" name="hobbies" value="2" th:checked="${#arrays.contains(user.hobbies,'2')?'checked':'false'}"/>play
                    <input type="checkbox" name="hobbies" value="3" th:checked="${#arrays.contains(user.hobbies,'3')?'checked':'false'}"/>sleep<br/>
            description:<textarea rows="5" cols="20" name="description">[[${user.description}]]</textarea>
        </form>

        <hr/>

        <form action="#">
            <input type="hidden" name="id" th:field="${user.id}"/><br/>
            username:<input type="text" name="username" th:field="${user.username}"/><br/>
            password:<input type="password" name="password" th:field="${user.password}"/><br/>
            sex:<input type="radio" name="sex" value="1" th:field="${user.sex}"/>m
                <input type="radio" name="sex" value="0" th:field="${user.sex}"/>w<br/>
            edu:<select name="edu">
                    <option>---select---</option>
                    <option value="1" th:field="${user.edu}">aaa</option>
                    <option value="2" th:field="${user.edu}">bbb</option>
                    <option value="3" th:field="${user.edu}">ccc</option>
                </select><br/>
            hobbies:<input type="checkbox" name="hobbies" value="1" th:field="${user.hobbies}"/>eat
            <input type="checkbox" name="hobbies" value="2" th:field="${user.hobbies}"/>play
            <input type="checkbox" name="hobbies" value="3" th:field="${user.hobbies}"/>sleep<br/>
            description:<textarea rows="5" cols="20" name="description" th:field="${user.description}"></textarea>
        </form>


        <br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
    </body>
</html>